package com.liusand.common;

import com.liusand.pojo.User;

/**
 * @author :liusha
 * packageName :com.liusand.common
 * fileName :UserThreadLocalUtils
 * creationTime :2022/12/1 15:47
 */
public class UserThreadLocalUtils {
    private static ThreadLocal<User> threadLocal = new ThreadLocal<>();

    public static void setThreadLocal(User user){
        threadLocal.set(user);
    }

    public static String getId(){
        return threadLocal.get().getId();
    }
}
